<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: new_option.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

echo draw_form('new_option', FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_options&'.getMenuID('products_attributes').$opt_add, 'post', 'id="dialog_form" enctype="multipart/form-data"');
 
$next_id = $db->db_query("SELECT MAX(products_options_id)+1 AS next_id FROM ".TABLE_PRODUCTS_OPTIONS);
echo draw_hidden_field('products_options_id', ($next_id->fields['next_id']==0?1:$next_id->fields['next_id'])); 
?>
	<table width="100%" cellpadding="6">
	<?php
		for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
			$lang_img = image('../lang/'.$languages[$i]['directory'].'/'.$languages[$i]['image'], $languages[$i]['name']);
			echo '	<tr>
						<td width="20%"><b>Name:</b></td>
						<td>'.$lang_img.' <input type="text" name="option_name['.$languages[$i]['id'].']" size="20"></td>
					</tr>';

			echo '	<tr>
						<td><b>Grafik:</b></td>
						<td>'.$lang_img.' '.draw_file_field('option_image_'.$languages[$i]['id']).'</td>
					</tr>';

			echo '	<tr>
						<td valing="top"><b>Beschreibung:</b></td>
						<td>'.$lang_img.' <textarea name="option_desc['.$languages[$i]['id'].']" cols="50" rows="4" style="width:95%"></textarea></td>
					</tr>';
		}
	?>
	</table>
</form>